﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace com.instalinks.android.web.web2sms
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            String authToken = this.txtAuthToken.Text;
            String registrationId = this.txtRegistrationId.Text;
            String mode = this.ddlMode.SelectedValue;
            String appId = this.txtAppId.Text;
            String field1 = this.txtField1.Text;
            String field2 = this.txtField2.Text;
            String field3 = this.txtField3.Text;
            String field4 = this.txtField4.Text;

            this.lblError.Text = "";
            String response = "";
            try
            {
                C2DMService srv = new C2DMService();
                response = srv.Notify(authToken, registrationId, mode,appId, field1, field2, field3,field4);
            }
            catch (Exception ex)
            {
                response = "error : " + ex.Message;
            }

            this.lblError.Text = response;
        }
       
    }
}